RequireUIFile("jquery-ui.css", AF::ORDER_FIRST); $GLOBALS["AF"]->RequireUIFile("jquery-ui.js"); # ----- EXPORTED FUNCTIONS --------------------------------------------------- /** * Print the given folder item. * @param Record $Resource resource object * @param Folder $Folder the folder the resource belongs to * @param Resource|null $Previous previous resource or NULL if at the beginning * @param Resource|null $Next next resource or NULL if at the end * @return void */ function PrintFolderItem(Folder $Folder, Record $Resource, $Previous, $Next) { $SafeFolderId = defaulthtmlentities(urlencode($Folder->Id())); $SafeItemId = defaulthtmlentities(urlencode($Resource->Id())); $Summary = ResourceSummary::Create($Resource->id()); $Summary->IncludeResourceType(true); $Summary->AdditionalContext([ "FolderId" => $Folder->Id() ]); ?>
Display(); ?>
10, 25 => 25, 50 => 50, 100 => 100]; $ShowLimit = $HasPreviousItems || $HasNextItems || min($LengthValues) < $TotalItemCount; $HasItems = ($TotalItemCount > 0) ? true : false; $PaginationUrl = "index.php?P=P_Folders_ViewFolder&FolderId=".$SafeId."&Length=".$SafeLength; if ($H_CurrentSortField != "Placeholder") { $PaginationUrl .= "&F_SortFieldId=".$H_CurrentSortField."&AO=".intval($H_AscSortingOrder); } $SortItemList["Placeholder"] = "-- select an option --"; $FieldTypesForSorting = [ MetadataSchema::MDFTYPE_TEXT, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_DATE, MetadataSchema::MDFTYPE_TIMESTAMP, MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_USER ]; # schemas to retrieve field (for sorting) from foreach ($H_FolderSchemas as $SchemaId => $Val) { $Schema = new MetadataSchema($SchemaId); $SchemaName = $Schema->Name(); # retrieve field names for all field type foreach ($FieldTypesForSorting as $Type) { $Fields = $Schema->GetFields($Type); foreach ($Fields as $FieldId => $Field) { $SortItemList[$SchemaName][$FieldId] = $Field->Name(); } } } ?>
mb-2">

#

Sort By: SubmitOnChange(true); $OptionList->DisabledOptions("Placeholder"); $OptionList->PrintHtml(); ?>
Descending Order />
Ascending Order />
PUIFile("cog.png"); ?>" alt="" /> Edit Name
PUIFile("cross.png"); ?>" alt="" /> Delete Clear
Clear contents of folder ?
" alt="" /> Manage Folders SignalEvent( "EVENT_HTML_INSERTION_POINT", [ "PageName" => $GLOBALS["AF"]->GetPageName(), "Location" => "Folder Buttons", "Context" => ["FolderId" => $Folder->Id()] ] ); ?>

There are no items in this folder.

← Previous
Resources Per Page: SubmitOnChange(true); $OptionList->PrintHtml(); ?>
Next →